package com.lagou.dao;

import com.lagou.domain.Course;
import com.lagou.domain.CourseLesson;
import com.lagou.domain.CourseSection;

import java.util.List;

public interface CourseContentMapper {

    /**
     * 查询课程下的章节与课时信息
     * @param courseId
     * @return
     */
    public List<CourseSection>  findSectionAndLessonByCourseId(int courseId);

    /**
     * 根据id查询课程
     * @param courseId
     * @return
     */
    public Course findCourseById(int courseId);

    /**
     * 新建章节
     * @param courseSection
     */
    public void saveSection(CourseSection courseSection);

    /**
     * 更新章节
     * @param courseSection
     */
    public void updateSection(CourseSection courseSection);

    /**
     * 修改章节状态
     * @param courseSection
     */
    public void updateSectionStatus(CourseSection courseSection);

    /**
     * 新建课时
     * @param courseLesson
     */
    public void saveLesson(CourseLesson courseLesson);
}
